import requests
from hashlib import md5

pwd_s = 'Zzc0508@'
url = 'https://mp.weixin.qq.com/cgi-bin/bizlogin?action=startlogin'
newmd5 = md5()
newmd5.update(pwd_s.encode('utf-8'))
pwd_mi = newmd5.hexdigest()
print(pwd_mi)

form_data = {
    "username": "zczhaod@163.com",
    "pwd": pwd_mi,
    "imgcode": "",
    "f": "json",
    "userlang": "zh_CN",
    "redirect_url": "",
    "token": "",
    "lang": "zh_CN",
    "ajax": "1",
}

headers = {
    "accept": "*/*",
    "accept-encoding": "gzip, deflate, br, zstd",
    "accept-language": "zh-CN,zh;q=0.9",
    "content-length": "127",
    "content-type": "application/x-www-form-urlencoded; charset=UTF-8",
    "cookie": "pgv_pvid=554462552; ua_id=p94bvYGD8oTU4qIlAAAAABAoTHlLH8bc0Rw2mmQBN3g=; wxuin=70301944536087; RK=6v2I3HG4WU; ptcz=24b7e95822252e407be88bc043523ee0b6bff5ed49fccec425e55f4daa86e06f; fqm_pvqid=085886c2-5065-421a-9caf-05a6feaa0262; qq_domain_video_guid_verify=ea0b053cee3b99f0; _qimei_uuid42=18901061939100de27deacad79b54069868ce4856f; _qimei_fingerprint=1675956339289c005c7edaa46e44cfd5; _qimei_h38=fdeddd5927deacad79b5406902000006118901; _qimei_q32=381b1bcd537ab7be277e244d146b77b6; _qimei_q36=5e1627006612eac6965f97ac30001511771c; _clck=1j8wkth|1|fro|0; cert=r0yGy_ACne0YGos1PmKThGTXvSDS079G; uuid=863f8a7d6cb1190436f07f0327705689",
    "origin": "https://mp.weixin.qq.com",
    "priority": "u=1, i",
    "referer": "https://mp.weixin.qq.com/",
    "sec-ch-ua": "\"Not(A:Brand\";v=\"99\", \"Google Chrome\";v=\"133\", \"Chromium\";v=\"133\"",
    "sec-ch-ua-mobile": "?0",
    "sec-ch-ua-platform": "\"Windows\"",
    "sec-fetch-dest": "empty",
    "sec-fetch-mode": "cors",
    "sec-fetch-site": "same-origin",
    "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36",
    "x-requested-with": "XMLHttpRequest"
}

resp = requests.post(url, data=form_data, headers=headers)
print(resp.text)
